package com.hy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hy.domain.Gift;

@Controller
public class NewHylpController {
	
	@RequestMapping("/hylp/view/{id}")
	public String view(@PathVariable long id, Model model) {
		Gift gift = Gift.findGift(id);
		model.addAttribute("gift", gift);
		model.addAttribute("up", gift.getUp());
		model.addAttribute("next", gift.getNext());
		return "hylp_xq";
	}
}
